package com.qby.framework.filter.login;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @description: 不需要过滤的配置
 * @author: qiu bo yang
 * @create: 2020-03-26 08:54
 */
@Component
public class NoAuthConfig {
    @Value("${website.notAuth.url}")
    private String notAuthUrl;

    @Value("${website.token.head}")
    private String tokenHeader;
    /**
     * 获取不需要鉴权的链接
     *
     * @return
     */
    public String[] getNotAuthUrls() {
        String[] notAuthUrls = null;
        if ((StringUtils.isNotBlank(notAuthUrl))) {
            notAuthUrls = notAuthUrl.split(",");
        }
        return notAuthUrls;
    }

    /**
     * 获取token请求头
     *
     * @return
     */
    public String getTokenHeader() {
        return tokenHeader;
    }
}
